package com.thon.controller.rest.dto;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thon.commons.mapper.BeanMapper;
import com.thon.entity.user.Coupon;

/** 
 * 类说明   优惠券信息过滤
 * @author jiang
 * @date 创建时间：2014年7月3日 上午10:22:58 
 */
public class CouponDto {
	
	private Integer id; //优惠券id
	private String label;
	private String couponExplain;
	private Integer couponValue;
	private String couponNo;
	private String couponStatus;   //0：未发放，1：发放，2：已使用，3：归档，4：失效'
	private Date createdDate;
	private Date overdueDate;
	private String memo;
	private Integer addressId;//地址id

	
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getCouponExplain() {
		return couponExplain;
	}

	public void setCouponExplain(String couponExplain) {
		this.couponExplain = couponExplain;
	}

	public Integer getCouponValue() {
		return couponValue;
	}

	public void setCouponValue(Integer couponValue) {
		this.couponValue = couponValue;
	}

	public String getCouponNo() {
		return couponNo;
	}

	public void setCouponNo(String couponNo) {
		this.couponNo = couponNo;
	}

	public String getCouponStatus() {
		return couponStatus;
	}

	public void setCouponStatus(String couponStatus) {
		this.couponStatus = couponStatus;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Date getOverdueDate() {
		return overdueDate;
	}

	public void setOverdueDate(Date overdueDate) {
		this.overdueDate = overdueDate;
	}
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	
	public static CouponDto covert(CouponDto couponDto,Coupon coupon){
		couponDto = BeanMapper.map(coupon, CouponDto.class);
		return couponDto;
	}

	public Integer getAddressId() {
		return addressId;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}
	

}
